gr2ps - convert Gremlin files to PostScript
gr2ps [ -n ] [ -p X Y ] [ -s X Y ] [ -t X Y ] [ input ]
This program takes a picture description produced by the Gremlin picture editor and converts it a PostScript page that can be printed on any printer that supports this language, such as the Apple LaserWriter. Gr2ps handles the different types of elements in this Gremlin output to produces a good looking page on a LaserWriter.
It takes the name of a Gremlin file (default is standard input) and writes the resulting PostScript file to its standard output, unless the -o option (see below) is given, in which case it writes to the specified file.
Gr2ps produces a file that can be included into another page description. This is meant to be used when a PostScript file is being imbedded into a document of another type (such as TeX, using \special). If the file is to be printed directly, the user must add a call to showpage to the ``%%Trailer'' section at the end.
The gremlin coordinates are normally coppied out directly to PostScript coordinates (the inherited user space). This behavior can be modified with the -s and -t options (see below). Note that if scaling and translation are both specified, the translation is performed after the scaling (i.e., the translation factor is not affected by the scale). This is unlike PostScript, where the order of the operations matters. Also, the lower-left corner of the picture may be placed at any location on the page with the -p option.
By default, the four troff fonts, R, I, B and S are mapped to the LaserWriter fonts Times-Roman, Times-Italic, Times-Bold and Courier-Bold respectively. This action can be changed with the -R, -I, -B and -S options.
Gr2ps obeys of the Adobe PostScript file structuring conventions. In particular, each file begins with a set of comments which introduce the file as PostScript code and specify the bounding box of the figure along with other information.
John Coker, University of California, Berkeley john@renoir.Berkeley.EDU Peehong Chen, University of California, Berkeley phc@renoir.Berkeley.EDU
PostScript is a trademark of Adobe Systems, Inc.
Apple and LaserWriter are trademarks of Apple Computers.
Because the Gremlin coordinate system is different from the PostScript one, the -s and -t options are almost always necessary to get the output sized and placed properly. Of course, they can be emulated in PostScript with the scale and translate operators.
The grey scale used does not really correspond in any rational way with the set of gremlin stipples. It would be possible to use bit rasters in PostScript to emulate the gremlin stipple patterns, but the author thought this of dubious use.